package com.yf.dao.im;

import com.yf.dao.BaseDao;
import com.yf.entity.MsgSessionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 好友请求Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Oct 17 15:08:36 CST 2018
 */
public interface MsgSessionDao extends BaseDao<MsgSessionEntity> {

    //查询和所有好友的会话
    List<MsgSessionEntity> getByTargetId(Long targetId);

    //查询和某个好友的会话
    MsgSessionEntity getFriendSession(@Param("sessionId") Long sessionId, @Param("targetId") Long targetId);

    //查询和群的会话
    MsgSessionEntity  getGroupSession(Long sessionId);


    List<MsgSessionEntity>  getAllGroupSession(List<Long> sessionId);

}
